/**
 *Copyright (c) 2024 watereyes
 * workflow is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.workflow.baseConfig.service;

import com.koron.workflow.baseConfig.bean.RoleLineBean;
import com.koron.workflow.baseConfig.bean.RoleLineTeamBean;
import com.koron.workflow.baseConfig.bean.RoleLineTeamUserBean;
import com.koron.workflow.common.bean.PageBean;
import com.koron.workflow.common.bean.StaffBean;
import org.koron.ebs.mybatis.SessionFactory;
import org.swan.bean.MessageBean;

import java.util.List;

/**
 * @author qingfeng
 * @description: TODO
 * @date 2020/4/13 14:12
 */
public interface RoleLineService {
	
	/**
	 * @param factory
	 * @param roleId
	 * @param startUser
	 * @return
	 */
	List<StaffBean> queryForRoleId(SessionFactory factory, String roleId, String startUser);

    PageBean<RoleLineBean> queryForList(SessionFactory factory, String name, Integer page, Integer pageSize);

    /**
     * 保存
     * @param factory
     * @param bean
     */
    MessageBean<String> save(SessionFactory factory, RoleLineBean bean, StaffBean user);

    /**
     * 删除
     * @param factory
     * @param id
     */
    void delete(SessionFactory factory,String id);

    /**
     * 查询详情
     * @param factory
     * @param id
     * @return
     */
    RoleLineBean queryForObject(SessionFactory factory,String id);

    void insertRoleLineTeam(SessionFactory factory, RoleLineTeamBean bean);

    void deleteRoleLineTeam(SessionFactory factory, String roleLineTeamId);

    void deleteRoleLineTeamUser(SessionFactory factory,String id);

    void batchInsertRoleLineTeamUser(SessionFactory factory, List<RoleLineTeamUserBean> list,String teamId);

    List<RoleLineTeamBean> review(SessionFactory factory,String roleId);

    List<RoleLineTeamBean> queryTeamByRoleId(SessionFactory factory,String roleId);

    List<RoleLineTeamUserBean> queryTeamUserByTeamId(SessionFactory factory,String teamId);
}
